package ru.papergames.model.binsocket.packets.request
{
	import ru.papergames.model.binsocket.data.ExtByteArray;
	import ru.papergames.model.binsocket.packets.SocketRequest;

	public class AuthReconnectRequest extends SocketRequest
	{
		public static const NOTIFICATION:String = 'AuthReconnectRequest';
		
		public var playerId:uint;
		public var secretKey:uint;
		
		public function AuthReconnectRequest(playerId:uint, key:uint)
		{
			super(0xA1);
			this.playerId = playerId;
			this.secretKey = key;
		}
		
		override protected function getPacketBody():ExtByteArray {
			var body:ExtByteArray = new ExtByteArray();
			
			body.writeUnsignedInt(playerId);
			body.writeUnsignedInt(secretKey);
			
			return body;
		}
		
		override public function getNotification():String {
			return NOTIFICATION;
		}
	}
}